home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2005 October / PCWOCT05.iso / Software / FromTheMag / XAMPP 1.4.14 / xampp-win32-1.4.14-installer.exe / xampp / phpMyAdmin / scripts / find_unused_messages.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2004-10-12  |  459b  |  17 lines

  1. #!/bin/sh
  2.  
  3. # Simple script to find unused message strings by Michal ─îiha┼Ö
  4.  
  5. phpfiles=`find . -type f -a -name '*.php' -a -not -path '*/lang/*'`
  6.  
  7. sed -n '/^\$str/ s/\$\([^ ]*\) .*/\1/p' lang/english-iso-8859-1.inc.php \
  8.     | grep -v ^strTransformation_ \
  9.     | while read x
  10.         do
  11.             echo "Checking for $x" >&2
  12.             if [ `grep -r "\\<$x\\>" $phpfiles | wc -l` -eq 0 ] 
  13.             then
  14.                 echo $x
  15.             fi
  16.         done
  17.